package com.nf.health.app.models;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
/**
 * 测评问题
 * @author lgs
 *
 */
public class EvaluationQuestion implements BaseModel{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ArrayList<LinkedHashMap<String, String>> answer;
	private ArrayList<Map.Entry<String, String>> answerList = new ArrayList<Map.Entry<String,String>>();
	private String answercount;
	private String autoid;
	private String correctanswer;
	private String parentid;
	private String qnumber;
	private String title;
	private String type; 
	private LinkedHashMap<String, String> weightortype;
	private int selectedNo = -1;
/*	*//**
	 * 标记题目是否已经作答
	 *//*
	private boolean isChecked = false;
	
	
	public boolean isChecked() {
		return isChecked;
	}

	*//**
	 * 标记问题是否已经作答
	 * @param isChecked
	 *//*
	public void setChecked(boolean isChecked) {
		this.isChecked = isChecked;
	}
*/
	public ArrayList<LinkedHashMap<String, String>> getAnswer() {
		return answer;
	}

	public void setAnswer(ArrayList<LinkedHashMap<String, String>> answer) {
		this.answer = answer;
	}

	public String getAnswercount() {
		return answercount;
	}

	public void setAnswercount(String answercount) {
		this.answercount = answercount;
	}

	public String getAutoid() {
		return autoid;
	}

	public void setAutoid(String autoid) {
		this.autoid = autoid;
	}

	public String getCorrectanswer() {
		return correctanswer;
	}

	public void setCorrectanswer(String correctanswer) {
		this.correctanswer = correctanswer;
	}

	public String getParentid() {
		return parentid;
	}

	public void setParentid(String parentid) {
		this.parentid = parentid;
	}

	public String getQnumber() {
		return qnumber;
	}

	public void setQnumber(String qnumber) {
		this.qnumber = qnumber;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public LinkedHashMap<String, String> getWeightortype() {
		return weightortype;
	}

	public void setWeightortype(LinkedHashMap<String, String> weightortype) {
		this.weightortype = weightortype;
	}

	@Override
	public void parse(String jsonString) {
	}

	public int getSelectedNo() {
		return selectedNo;
	}

	public void setSelectedNo(int selectedNo) {
		this.selectedNo = selectedNo;
	}

	public ArrayList<Map.Entry<String, String>> getAnswerList() {
		return answerList;
	}

	public void setAnswerList(ArrayList<Map.Entry<String, String>> answerList) {
		this.answerList = answerList;
	}
	/**
	 * 重新整理问题的答案，放置在Entry中，方便获取
	 */
	public void convert() {
		if(answer != null){
			for(LinkedHashMap<String, String> item: answer){
				for (Map.Entry<String, String> entry : item.entrySet()) {
					answerList.add(entry);
					break;
				}
			}
		}
	}

}
